package com.sun.audit.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author pytho
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AuditOperation {

    AuditOperation.OperationType operation();

    Class<?> entityType() default Void.class;

    String entityExpression() default "";

    String idExpression() default "";

    enum OperationType {
        CREATE, UPDATE, DELETE, BATCH_UPDATE, BATCH_DELETE
    }
}